# Copyright 2010-2021, Google Inc.
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
#
#     * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#     * Redistributions in binary form must reproduce the above
# copyright notice, this list of conditions and the following disclaimer
# in the documentation and/or other materials provided with the
# distribution.
#     * Neither the name of Google Inc. nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

load("//tools/build_defs:stubs.bzl", "jspb_proto_library")

package(default_visibility = [
    "//:__subpackages__",
])

cc_proto_library(
    name = "user_dictionary_storage_cc_proto",
    deps = [":user_dictionary_storage_proto"],
)

cc_proto_library(
    name = "candidates_cc_proto",
    deps = [":candidates_proto"],
)

cc_proto_library(
    name = "config_cc_proto",
    deps = [":config_proto"],
)

cc_proto_library(
    name = "engine_builder_cc_proto",
    deps = [":engine_builder_proto"],
)

cc_proto_library(
    name = "commands_cc_proto",
    deps = [":commands_proto"],
)

cc_proto_library(
    name = "state_cc_proto",
    deps = ["state_proto"],
)

proto_library(
    name = "commands_proto",
    srcs = [
        "commands.proto",
    ],
    deps = [
        ":candidates_proto",
        ":config_proto",
        ":engine_builder_proto",
        ":user_dictionary_storage_proto",
    ],
)

jspb_proto_library(
    name = "commands_jspb_proto",
    visibility = [],
    deps = [":commands_proto"],
)

# Proto library for Android Java.
JAVA_PROTO_VISIBILITY = [
]

java_lite_proto_library(
    name = "candidates_java_proto_lite",
    visibility = JAVA_PROTO_VISIBILITY,
    deps = [":candidates_proto"],
)

java_lite_proto_library(
    name = "commands_java_proto_lite",
    visibility = JAVA_PROTO_VISIBILITY,
    deps = [":commands_proto"],
)

java_lite_proto_library(
    name = "config_java_proto_lite",
    visibility = JAVA_PROTO_VISIBILITY,
    deps = [":config_proto"],
)

java_lite_proto_library(
    name = "engine_builder_java_proto_lite",
    visibility = JAVA_PROTO_VISIBILITY,
    deps = [":engine_builder_proto"],
)

java_lite_proto_library(
    name = "user_dictionary_storage_java_proto_lite",
    visibility = JAVA_PROTO_VISIBILITY,
    deps = [":user_dictionary_storage_proto"],
)

proto_library(
    name = "config_proto",
    srcs = ["config.proto"],
)

jspb_proto_library(
    name = "config_jspb_proto",
    visibility = [],
    deps = [":config_proto"],
)

proto_library(
    name = "renderer_proto",
    srcs = [
        "renderer_command.proto",
        "renderer_style.proto",
    ],
    visibility = ["//visibility:private"],
    deps = [":commands_proto"],
)

cc_proto_library(
    name = "renderer_cc_proto",
    deps = [":renderer_proto"],
)

proto_library(
    name = "candidates_proto",
    srcs = [
        "candidates.proto",
    ],
)

jspb_proto_library(
    name = "candidates_jspb_proto",
    visibility = [],
    deps = [":candidates_proto"],
)

proto_library(
    name = "state_proto",
    srcs = ["state.proto"],
    visibility = ["//visibility:private"],
    deps = [
        ":candidates_proto",
        ":commands_proto",
    ],
)

proto_library(
    name = "user_dictionary_storage_proto",
    srcs = ["user_dictionary_storage.proto"],
)

jspb_proto_library(
    name = "user_dictionary_storage_jspb_proto",
    visibility = [],
    deps = [":user_dictionary_storage_proto"],
)

proto_library(
    name = "segmenter_data_proto",
    srcs = ["segmenter_data.proto"],
    visibility = ["//visibility:private"],
)

cc_proto_library(
    name = "segmenter_data_cc_proto",
    deps = [":segmenter_data_proto"],
)

proto_library(
    name = "engine_builder_proto",
    srcs = ["engine_builder.proto"],
    visibility = ["//visibility:private"],
)
